﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace DOAN.Admin
{
    public partial class Admin1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["quyen"] != null)
            {
                if (Session["Tendangnhap"] != null && Session["Tendangnhap"].ToString() != "")
                {
                    MasterPage mt = this.Master as MasterPage;
                    LinkButton lb = mt.FindControl("LinkButton1") as LinkButton;
                    lb.Visible = false;
                    Label bl = mt.FindControl("lblDnthanhcong") as Label;
                    bl.Visible = true;
                    Label blten = mt.FindControl("lbtendn") as Label;
                    blten.Visible = true;
                    blten.Text = Session["Tendangnhap"].ToString();
                    LinkButton lbDangky = mt.FindControl("lbDangky") as LinkButton;
                    lbDangky.Visible = false;
                    LinkButton lbthoat = mt.FindControl("lbThoat") as LinkButton;
                    lbthoat.Visible = true;

                }

            }
            else
            {
                Response.Redirect("LoginAdmin.aspx");
            }
        }
    }
}
